﻿using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria;

namespace EAS.Content.Items
{
    [AutoloadEquip(new EquipType[] { EquipType.Balloon })]
    public class SuperBalloonAcc : ModItem
    {
        public override void SetStaticDefaults()
        {
            CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
        }


        public override void SetDefaults()
        {
            Item.accessory = true;
            Item.width = 26;
            Item.height = 34;
            Item.rare = ItemRarityID.Orange;
            Item.value = Item.sellPrice(0, 4, 25, 0);
        }


        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.moveSpeed += 0.15f;
            player.maxRunSpeed += 0.15f;
            player.jumpSpeedBoost += 1.5f;
            player.GetJumpState(ExtraJump.CloudInABottle).Enable();
            player.GetJumpState(ExtraJump.SandstormInABottle).Enable();
            player.GetJumpState(ExtraJump.BlizzardInABottle).Enable();
            player.GetJumpState(ExtraJump.TsunamiInABottle).Enable();
            player.GetJumpState(ExtraJump.FartInAJar).Enable();
            player.jumpBoost = true;
            player.autoJump = true;
            player.noFallDmg = true;
            player.autoJump = true;
        }


        public override void AddRecipes()
        {
            Recipe modRecipe = Recipe.Create(Type, 1);
            modRecipe.AddTile(TileID.TinkerersWorkbench);
            modRecipe.AddIngredient(ItemID.BundleofBalloons, 1);
            modRecipe.AddIngredient(ItemID.FartInABalloon, 1);
            modRecipe.AddIngredient(ItemID.SharkronBalloon, 1);
            modRecipe.AddIngredient(ItemID.FrogLeg, 1);
            modRecipe.AddIngredient(ItemID.Bone, 50);
            modRecipe.Register();
        }
    }
}
